Graphics processing systems are typically configured to receive graphics data, e.g. from an application running on a computer system, and to render the graphics data to provide a rendering output. For example, the graphics data provided to a graphics processing system may describe geometry within a three dimensional (3D) scene to be rendered, and the rendering output may be a rendered image of the scene. Some graphics processing systems (which may be referred to as “tile-based” graphics processing systems) use a rendering space which is subdivided into a plurality of tiles. The “tiles” are regions of the rendering space, and may have any suitable shape, but are typically rectangular (where the term “rectangular” includes square). To give some examples, a tile may cover a 16×16 block of pixels or a 32×32 block of pixels of an image to be rendered. As is known in the art, there are many benefits to subdividing the rendering space into tiles. For example, subdividing the rendering space into tiles allows an image to be rendered in a tile-by-tile manner, wherein graphics data for a tile can be temporarily stored “on-chip” during the rendering of the tile, thereby reducing the amount of data transferred between a system memory and a chip on which a graphics processing unit (GPU) of the graphics processing system is implemented.
Tile-based graphics processing systems typically operate in two phases: a geometry processing phase and a rasterisation phase. In the geometry processing phase, the graphics data for a render is analysed to determine, for each of the tiles, which graphics data items are present within that tile. Then in the rasterisation phase, a tile can be rendered by processing those graphics data items which are determined to be present within that tile (without needing to process graphics data items which were determined in the geometry processing phase to not be present within the particular tile). The graphics data items may represent geometric shapes, which describe surfaces of structures in the scene, and which are referred to as “primitives”. A common primitive shape is a triangle, but primitives may be other 2D shapes or may be lines or points also. Objects can be composed of one or more (e.g. hundreds, thousands or millions) of such primitives.
FIG. 1 shows some elements of a graphics processing system 100 which may be used to render an image of a 3D scene. The graphics processing system 100 comprises a graphics processing unit (GPU) 102 and two portions of memory 1041 and 1042. The two portions of memory 1041 and 1042 may, or may not, be parts of the same physical memory.
The GPU 102 comprises a pre-processing module 106, a tiling unit 108 and a rasterization module 110, wherein the rasterization module 110 comprises a hidden surface removal (HSR) unit 112 and a texturing/shading unit 114. The texturing/shading unit 114 comprises one or more processing engines which may be referred to as “Unified Shading Clusters” (USCs). The graphics processing system 100 is arranged such that a sequence of primitives provided by an application is received at the pre-processing module 106.
In a geometry processing phase, the pre-processing module 106 performs functions such as geometry processing including clipping and culling to remove primitives which do not fall into a visible view. The pre-processing module 106 may also project the primitives into screen-space. The primitives which are output from the pre-processing module 106 are passed to the tiling unit 108 which determines which primitives are present within each of the tiles of the rendering space of the graphics processing system 100. The tiling unit 108 assigns primitives to tiles of the rendering space by creating display lists for the tiles, wherein the display list for a tile includes indications of primitives which are present within the tile. The display lists and the primitives are outputted from the tiling unit 108 and stored in the memory 1041.
In a rasterisation phase, the rasterization block 110 fetches the display list for a tile and the primitives relevant to that tile from the memory 1041. The HSR unit 112 performs hidden surface removal to thereby remove fragments of primitives which are hidden in the scene. Methods of performing hidden surface removal are known in the art. The term “fragment” refers to a sample of a primitive at a sampling point, which is to be processed to render pixels of an image. In some examples, there may be a one to one mapping of fragments to pixels. In other examples there may be more fragments than pixels, and this oversampling can allow for higher quality rendering of pixel values, e.g. by facilitating anti-aliasing and other filtering that may be applied to multiple fragments for rendering each of the pixel values. The remaining fragments are passed from the HSR unit 112 to the texturing/shading unit 114 which performs texturing and/or shading on the fragments to determine pixel colour values of a rendered image which can be passed to the memory 1042 for storage in a frame buffer. The texturing/shading unit 114 may receive texture data from the memory 1041 in order to apply texturing to the primitive fragments, as is known in the art (e.g. by running a shader program). The texturing/shading unit 114 may apply further processing to the primitive fragments (e.g. alpha blending and other processes), as is known in the art in order to determine rendered pixel values of an image. The rasterization block 110 processes primitives in each of the tiles and when the whole image has been rendered and stored in the memory 1042, the rendered image can be outputted from the graphics processing system 100 and used in any suitable manner, e.g. displayed on a display or stored in memory or transmitted to another device, etc.
The texturing/shading unit 114 may include more than one processing engine which can process different data in parallel, thereby improving the efficiency of the texturing and/or shading performed by the texturing/shading unit 114. The rasterisation block 110 may be configured to render primitives for a single tile at a time.